﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using Microsoft.Extensions.Configuration;

namespace DataChangeTools.Utils
{
    public class ConfigHelper
    {
        private static IConfigurationRoot builder;

        static ConfigHelper()
        {
            var Path = Directory.GetCurrentDirectory();
            builder = new ConfigurationManager()
                        .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                        .Build();
        }

        public static string GetValue(string key)
        {
            return builder.GetSection(key).Value;
        }

    }
}
